cmake_minimum_required(VERSION 3.14)
project(master)
set(CMAKE_CXX_STANDARD 11)

if(LINUX_X86_64)
    message("LINUX_X86_64--------")
    set(LIBDIR x64)
    set(INSTALL_DIR build_x86/edge_midware)

elseif(RK3308_ARM64)
    message("RK3308_ARM64----------")
    set(LIBDIR rk3308)
    set(INSTALL_DIR build/edge_midware)

elseif(ANDROID_ARM32)
    message("ANDROID_ARM32--------")
    set(LIBDIR ndk)
    set(INSTALL_DIR build_android/edge_midware)

elseif(ANDROID_ARM64)
    message("ANDROID_ARM64--------")
    set(LIBDIR ndk_aarch64)
    set(INSTALL_DIR build_android/edge_midware)

endif()


add_subdirectory(baseLib)
add_subdirectory(exec)

set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/../" CACHE STRING "The path to use for make install" FORCE)
install(TARGETS config_site     DESTINATION ${INSTALL_DIR})
install(TARGETS synergy_site    DESTINATION ${INSTALL_DIR})
install(TARGETS query_site      DESTINATION ${INSTALL_DIR})
install(TARGETS mdns            DESTINATION ${INSTALL_DIR})

